package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DzHuodongMapper;
import com.ruoyi.system.domain.DzHuodong;
import com.ruoyi.system.service.IDzHuodongService;


import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.mapper.DzHuiyuanMapper;
import com.ruoyi.system.domain.DzHuiyuan;
import com.ruoyi.system.service.IDzHuiyuanService;

/**
 * 热门活动Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-07
 */
@Service
public class DzHuodongServiceImpl implements IDzHuodongService 
{
    @Autowired
    private DzHuodongMapper dzHuodongMapper;

    @Autowired
    private ISysRoleService sysRoleService;

    @Autowired
    private IDzHuiyuanService dzHuiyuanService;

    /**
     * 查询热门活动
     * 
     * @param hdId 热门活动主键
     * @return 热门活动
     */
    @Override
    public DzHuodong selectDzHuodongByHdId(Long hdId)
    {
        return dzHuodongMapper.selectDzHuodongByHdId(hdId);
    }

    /**
     * 查询热门活动列表
     * 
     * @param dzHuodong 热门活动
     * @return 热门活动
     */
    @Override
    @DataScope(deptAlias = "d", userAlias = "u")
    public List<DzHuodong> selectDzHuodongList(DzHuodong dzHuodong)
    {

        return dzHuodongMapper.selectDzHuodongList(dzHuodong);
    }

    @Override
    public List<DzHuodong> selectDzHuodongListWeb(DzHuodong dzHuodong)
    {
        return dzHuodongMapper.selectDzHuodongList(dzHuodong);
    }

    /**
     * 新增热门活动
     * 
     * @param dzHuodong 热门活动
     * @return 结果
     */
    @Override
    public int insertDzHuodong(DzHuodong dzHuodong)
    {
        return dzHuodongMapper.insertDzHuodong(dzHuodong);
    }

    /**
     * 修改热门活动
     * 
     * @param dzHuodong 热门活动
     * @return 结果
     */
    @Override
    public int updateDzHuodong(DzHuodong dzHuodong)
    {
        return dzHuodongMapper.updateDzHuodong(dzHuodong);
    }

    /**
     * 批量删除热门活动
     * 
     * @param hdIds 需要删除的热门活动主键
     * @return 结果
     */
    @Override
    public int deleteDzHuodongByHdIds(Long[] hdIds)
    {
        return dzHuodongMapper.deleteDzHuodongByHdIds(hdIds);
    }

    /**
     * 删除热门活动信息
     * 
     * @param hdId 热门活动主键
     * @return 结果
     */
    @Override
    public int deleteDzHuodongByHdId(Long hdId)
    {
        return dzHuodongMapper.deleteDzHuodongByHdId(hdId);
    }
}
